<!-- 加载静态文件 -->
{# main.html注释哈 #}
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{% block title %}首页{% endblock %}</title>
<!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Custom CSS -->
    <style>
        body {
            {#background-image: url('{% static 'user/images/backgroud_image.png' %}'); /* 替换为你的背景图片 URL */#}
            background-size:cover;
            background-position: center;
            background-repeat: no-repeat;
            font-family: 'Arial', sans-serif;
            color: #333;
        }
        .container {
            margin-top: 50px;
            background-color: rgba(255, 255, 255, 0.9); /* 半透明白色背景 */
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        .table {
            margin-top: 20px;
        }
        .table-hover tbody tr:hover {
            background-color: #f1f1f1;
        }
        .btn-primary {
            background-color: #007bff;
            border: none;
            border-radius: 5px;
        }
        .btn-primary:hover {
            background-color: #0056b3;
        }
        .btn-danger {
            background-color: #dc3545;
            border: none;
            border-radius: 5px;
        }
        .btn-danger:hover {
            background-color: #c82333;
        }
        .btn-warning {
            background-color: #ffc107;
            border: none;
            border-radius: 5px;
        }
        .btn-warning:hover {
            background-color: #e0a800;
        }
    </style>
</head>
<body>
{% if is_login %}
    <p>欢迎回来，{{ request.user.username }}！</p>
    <a href="{% url 'logout' %}">退出登录</a>
{% else %}
    <p>您尚未登录。</p>
    <a href="{% url 'register' %}">注册</a>
    <a href="{% url 'login' %}">登录</a>
{% endif %}
{% block content %}{% endblock %}
{% include 'product_list.html' %}
</body>
</html>